﻿@{
    ViewBag.Title = "添加试题";
}


<div class="pageheader">
    <h2><i class="fa fa-user"></i>添加试题</h2>
</div>

    <form id="form">
        <div class="form-group">
            <label class="col-sm-3 control-label">题目</label>
            <div class="col-sm-6">
                <input type="text" name="Title" class="form-control" value="">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">选项(例： "A":"选项1","B":"选项2","C":"选项3")</label>
            <div class="col-sm-6">
                <input type="text" name="Option" class="form-control" value="">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">正确答案</label>
            <div class="col-sm-6">
                <input type="text" name="TureOption" class="form-control" value="">
            </div>
        </div>

        <div class="submit-footer">
            <button class="btn btn-primary" id="my_btnSave">提交</button>
        </div>

    </form>

<script>
    $(function () {
        $("#my_btnSave").on("click", function () {
            var url = "/Admin/Ex/Create/";
            var form = $("#form").serialize();
            $.post(url, form, function (data) {
                window.location.href = "/Admin/Ex/index";
            });
        });
    });
</script>